package com.netistate.pojo;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

@Entity
@Table(name="t_doc")
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE)
public class Doc {
	
	private int id;
	private String docName;
	private String type;
	private String createtime;
	private String docNo;
	private String creater;
	private long docLength;
	
	private ProjectServices projectServices;
	
	private Project project;
	
	@ManyToOne
	@JoinColumn(name="projectid")
	public Project getProject() {
		return project;
	}
	public void setProject(Project project) {
		this.project = project;
	}
	
	@ManyToOne
	@JoinColumn(name="projectServicesid")
	public ProjectServices getProjectServices() {
		return projectServices;
	}
	public void setProjectServices(ProjectServices projectServices) {
		this.projectServices = projectServices;
	}
	/*@ManyToOne
	@JoinColumn(name="saleid")
	public Sale getSale() {
		return sale;
	}
	public void setSale(Sale sale) {
		this.sale = sale;
	}
	@ManyToOne
	@JoinColumn(name="projectid")
	public Project getProject() {
		return project;
	}
	public void setProject(Project project) {
		this.project = project;
	}*/
	//get set
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public int getId() {
		return id;
	}
	
	public void setId(int id) {
		this.id = id;
	}
	public String getDocName() {
		return docName;
	}
	public void setDocName(String docName) {
		this.docName = docName;
	}
	
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getCreater() {
		return creater;
	}
	public void setCreater(String creater) {
		this.creater = creater;
	}
	public String getCreatetime() {
		return createtime;
	}
	public void setCreatetime(String createtime) {
		this.createtime = createtime;
	}
	public String getDocNo() {
		return docNo;
	}
	public void setDocNo(String docNo) {
		this.docNo = docNo;
	}
	public long getDocLength() {
		return docLength;
	}
	public void setDocLength(long docLength) {
		this.docLength = docLength;
	}
	
	
	
	
	
	

}
